package com.my.hp_hr.service;

import com.my.hp_hr.dao.LeaveDao;
import com.my.hp_hr.entity.Leave;

import java.util.List;

public class LeaveService {
    private LeaveDao leaveDao = new LeaveDao();
    public List<Leave> getNotAgreeList(int department_number, String status) throws Exception {
        return leaveDao.getNotAgreeList(department_number,status);
    }

    public List<Leave> getAgreeList(int department_number, String status) throws Exception {
        return leaveDao.getAgreeList(department_number,status);
    }

    public List<Leave> getAllList(int department_number) throws Exception {
        return leaveDao.getAllList(department_number);
    }

    public Leave getLeaveMsg(String id) throws Exception {
        return leaveDao.getLeaveList(id);
    }

    public void updateLeave(String id,String status) throws Exception {
        leaveDao.updateLeave(id,status);
    }
}
